<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>班级信息</title>
    <script src="/static/jquery-1.12.4.min.js"></script>
    <script src="/static/class.js"></script>
    <link rel="stylesheet" href="/static/main.css">
</head>
<body>
<h1>班级信息</h1>
<h3><a href="/add_class/">添加班级</a></h3>
<h3 id="show_add_class_model_btn">模态对话框添加班级</h3>

<table border="1" bgcolor="#faebd7">
    <thead>
        <tr>
            <td>ID</td>
            <td>班级名称</td>
            <td colspan="2">操作</td>
            <td colspan="2">模态对话框操作</td>
        </tr>
    </thead>
    <tbody>
        {% for class in class_list %}
            <tr>
                <td>{{ class.id }}</td>
                <td>{{ class.cname }}</td>
                <td><a href="/edit_class/?cid={{ class.id }}">Edit</a></td>
                <td><a href="/del_class/?cid={{ class.id }}">Del</a></td>
                <td class="model_edit_class_btn" cls_id={{ class.id }}>Model_Edit</td>
                <td class="model_del_class_btn" cls_id={{ class.id }}>Model_Del </td>
            </tr>
        {% endfor %}
    </tbody>
</table>

<div id="shadow" class="hide"></div>
<div id="add_cls_model" class="hide">
    <input id="model_cname" type="text" placeholder="班级">
    <button id="model_add_class_btn">SUBMIT</button>
    <button id="cancel_add_class_model_btn">CANCEL</button>
    <span id="alarm" class="alarm_class"></span>
</div>

<div id="edit_cls_model" class="hide">
    <input id="model_edit_cid" type="hidden">
    <input id="model_edit_cname" type="text" >
    <button id="model_edit_class_btn">SUBMIT</button>
    <button id="cancel_edit_class_model_btn">CANCEL</button>
    <span id="edit_alarm" class="alarm_class"></span>
</div>

</body>
</html>